package com.oracle.cmp.service;

import com.oracle.cmp.entity.Customer;
import com.oracle.jdbc.util.Dao;

import java.util.Date;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        //insert
        /*Dao.executeSql("insert into sys_customer values(default,?,?,?,?,?)",
                "华育兴业","13312345678","黑A11001","卡车",new Date());*/
        //update
        /*Dao.executeSql("update sys_customer set name = ?,tel=? where id=?",
                "华育兴业2","111111111",7);*/
/*        List<Customer> list= Dao.query("select * from sys_customer",Customer.class,null);
        for(Customer customer:list){
            System.out.println(customer.getName()+","+customer.getTel());
        }*/
        Customer customer = Dao.queryOne("select * from sys_customer where id = ?",Customer.class,7);
        System.out.println(customer.getName()+","+customer.getTel());
    }
}
